#include "language.h"

Language::Language(QObject *parent) :
    QObject(parent)
{}

Language::Language(const QString &icon, const QString &code,
                   const QString &name, QObject *parent)
    :m_icon(icon), m_code(code), m_name(name),
      QObject(parent)
{}

Language::~Language() {
    m_icon = QString();
    m_code = QString();
    m_name = QString();
}


Language & Language::operator=(const Language &oth) {
    if(oth == this)
        return *this;

  m_icon = oth.getIcon();
  m_code = oth.getCode();
  m_name = oth.getName();

    return *this;
}


bool Language::operator==(const Language &oth) {
    if(this->m_icon == oth.getIcon() &&
       this->m_code == oth.getCode() &&
       this->m_name == oth.getName())
        return true;

    return false;
}

bool & Language::operator !=(const Language &oth) {
    return !(*this == oth);
}
